
package Model;

import java.util.List;

import javax.persistence.*;

@Entity
@NamedQueries({
	@NamedQuery(name = "searchOwnerbyName", query = "SELECT e FROM Owner e WHERE e.name = :name"),
	@NamedQuery(name = "searchOwnerAll", query ="SELECT e FROM Owner e")

})
@PrimaryKeyJoinColumn(name="id")
public class Owner extends Person{
	
    @OneToMany(mappedBy = "owner")
    List<Pet> pets;

    public List<Pet> getPets() {
        return pets;
    }

    public void setPets(List<Pet> pets) {
        this.pets = pets;
    }
   
 
}
